import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/home/index.vue'



const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/famous',
    name: 'famous',
    component: () => import('../views/famous/index.vue')
  },
  {
    path: '/say',
    name: 'say',
    component: () => import('../views/say/index.vue')
  },
  {
    path: '/my',
    name: 'my',
    component: () => import('../views/my/index.vue')
  },
  {
    path: '/city',
    name: 'city',
    meta: {
      hidden: true
    },
    component: () => import('../views/city/index.vue')
  },
  {
    path: '/department',
    name: 'department',
    meta: {
      hidden: true
    },
    component: () => import('../views/department/index.vue')
  },
  {
    path: '/body',
    name: 'body',
    meta: {
      hidden: true
    },
    component: () => import('../views/body/index.vue')
  },
  {
    path: '/hospital',
    name: 'hospitalall',
    meta: {
      hidden: true
    },
    component: () => import('../views/hospital/index.vue')
  },
  {
    path: '/reservationlist',
    name: 'reservationlist',
    meta: {
      hidden: true
    },
    component: () => import('../views/reservation/reservationView.vue')
  },
  {
    path: '/day',
    name: 'day',
    meta: {
      hidden: true
    },
    component: () => import('../views/day/index.vue')
  },
  {
    path: '/hospitalinfo',
    name: 'hospitalinfo',
    meta: {
      hidden: true
    },
    component: () => import('../views/hospitalinfo/index.vue')
  },
  {
    path: '/doctor',
    name: 'doctorall',
    meta: {
      hidden: true
    },
    component: () => import('../views/doctor/index.vue')
  },
  {
    path: '/saydetail',
    name: 'saydetail',
    meta: {
      hidden: true
    },
    component: () => import('@/views/detail/sayDetail.vue')
  },
  {
    path: '/visitormanagement',
    name: 'visitormanagement',
    meta: {
      hidden: true
    },
    component: () => import('@/views/visitor/visitorManagement.vue')
  },
  {
    path: '/addvisitor',
    name: 'addvisitor',
    meta: {
      hidden: true
    },
    component: () => import('@/views/visitor/addVisitor.vue')
  },
  {
    path: '/modifyvisitor',
    name: 'modifyvisitor',
    meta: {
      hidden: true
    },
    component: () => import('@/views/visitor/modifyVisitor.vue')
  },
  {
    path: '/login',
    name: 'login',
    meta: {
      hidden: true
    },
    component: () => import('../views/login/index.vue')
  },

  {
    path: '/register',
    name: 'register',
    meta: {
      hidden: true
    },
    component: () => import('../views/register/index.vue'),
    children: [
      {
        path: 'step1',
        name: 'step1',
        component: () => import('../views/register/step1.vue'),
      },
      {
        path: 'step2',
        name: 'step2',
        component: () => import('../views/register/step2.vue'),
      },
      {
        path: 'step3',
        name: 'step3',
        component: () => import('../views/register/step3.vue'),
      },
    ]
  },
  {
    path: '/reservation',
    name: 'reservation',
    meta: {
      hidden: true
    },
    component: () => import('../views/reservation/index.vue')
  },
  {
    path: '/setup',
    name: 'setup',
    meta: {
      hidden: true
    },
    component: () => import('../views/setup/index.vue'),
    children: [
      {
        path: 'setuphome',
        name: 'setuphome',
        component: () => import('../views/setup/setuphome.vue'),
      },
      {
        path: 'message',
        name: 'message',
        component: () => import('../views/setup/message.vue'),
      },
      {
        path: 'messagedetails',
        name: 'messagedetails',
        component: () => import('../views/setup/messagedetails.vue'),
      },
      {
        path: 'address',
        name: 'address',
        component: () => import('../views/setup/address.vue'),
      },
      {
        path: 'addressstep',
        name: 'addressstep',
        component: () => import('../views/setup/addressstep.vue'),
      },
      {
        path: 'introduction',
        name: 'introduction',
        component: () => import('../views/setup/introduction.vue'),
      },
      {
        path: 'law',
        name: 'law',
        component: () => import('../views/setup/law.vue'),
      },
      {
        path: 'userservices',
        name: 'userservices',
        component: () => import('../views/setup/userservices.vue'),
      },
      {
        path: 'privacy',
        name: 'privacy',
        component: () => import('../views/setup/privacy.vue'),
      },
    ]
  },
  {
    path: '/mycollect',
    name: 'mycollect',
    meta: {
      hidden: true
    },
    component: () => import('../views/mycollect/index.vue'),
    children: [{
      path: 'hospital',
      name: 'hospital1',
      component: () => import('../views/mycollect/hospital.vue'),
    },
    {
      path: 'doctor',
      name: 'doctor',
      component: () => import('../views/mycollect/doctor.vue'),
    },
    {
      path: 'book',
      name: 'book',
      component: () => import('../views/mycollect/book.vue'),
    },
    ]
  },
  {
    path: '/myadvice',
    name: 'myadvice',
    meta: {
      hidden: true
    },
    component: () => import('../views/myadvice/myadvice.vue'),
  },
  {
    path: '/help',
    name: 'help',
    meta: {
      hidden: true
    },
    component: () => import('../views/help/index.vue'),
  },
  {
    path: '/myres',
    name: 'myres',
    meta: {
      hidden: true
    },
    component: () => import('../views/myres/myres.vue'),
  },
  {
    path: '/reservationinfo',
    name: 'reservationinfo',
    component: () => import('../views/reservation/reservationInfo.vue'),
  }
]



const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
})

export default router
